<template>
  <div>
    <a-card :bordered="false">
      <detail-list title="字典信息">
        <detail-list-item term="id">{{data.id}}</detail-list-item>
        <detail-list-item term="字典类型">{{data.dictType}}</detail-list-item>
        <detail-list-item term="字典类型名">{{ data.dictTypeName }}</detail-list-item>
        <detail-list-item term="字典键值">{{ data.dictValue }}</detail-list-item>
        <detail-list-item term="字典标签">{{data.dictLabel}}</detail-list-item>
        <detail-list-item term="字典排序">{{data.dictSort}}</detail-list-item>
        <detail-list-item term="是否启用">{{data.enabled ? '启用':'停用'}}</detail-list-item>
        <detail-list-item term="创建时间">{{data.gmtCreate}}</detail-list-item>
        <detail-list-item term="更新时间">{{data.gmtModified}}</detail-list-item>
      </detail-list>
    </a-card>
  </div>
</template>

<script>
import DetailList from "../../../components/tool/DetailList";
import { dictDetail } from "@/services/dict";

const data = {};
const DetailListItem = DetailList.Item;

export default {
  name: "TenantDetail",
  components: { DetailListItem, DetailList },
  data() {
    return {
      data,
    };
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {
      dictDetail(this.$route.params.id).then((rep) => {
        this.data = rep.data.data;
      });
    },
  },
};
</script>

<style lang="less" scoped>
.title {
  color: @title-color;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
}
</style>
